package com.gxa.learning.core.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Table;

/**
 * @Author ChenJ
 * @date 2021/12/07 13:41
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "tb_user_role")
public class UserRole {

    /**
     * 用户和角色的关联表
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "user_role_id")
    private Long id;

    /**
     * 用户编号
     */
    @Column(name = "user_id")
    private Long uId;

    /**
     * 角色编号
     */
    @Column(name = "role_id")
    private Long rId;

}
